<!DOCTYPE html>
<html lang="zh">

<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://unpkg.com/vue@next"></script>
    <link href="../css/style.css" rel="stylesheet"> </head>

<body>
    <div id="myApp">
        <h3>游戏列表</h3>
        <!-- Virtual DOM -->
        <div v-if="seen">2017最新发卖</div>
        <ol>
            <li v-for="game in games">{{game.title}} / {{game.price}}元</li>
        </ol>
    </div>
    <script>
        const myApp = {
            data() {
                return {
                    seen: true,
                    games: [
                        {
                            title: '勇者斗恶龙', 
                            price: 400
                        }, 
                        {
                            title: '超级马里奥', 
                            price: 380
                        }, 
                        {
                            title: '我的世界', 
                            price: 99
                        }
                    ]
                }
            }
        }
        Vue.createApp(myApp).mount('#myApp')
    </script>
</body>

</html>